package com.cqc.jdk8.Jtime;

import org.junit.Test;

import java.time.Month;
import java.time.YearMonth;

/**
 * @author cui
 * @date 2023/3/6 20:53
 * @description
 **/
public class YearMonthTest {

    @Test
    public void f1() {
        //2022年2月
        YearMonth  yearMonth = YearMonth.of(2022, Month.FEBRUARY);
        int lengthOfMonth = yearMonth.lengthOfMonth();
        int lengthOfYear = yearMonth.lengthOfYear();
        //2022年2月有28天，2022年有365天
        System.out.println("lengthOfMonth="+lengthOfMonth+",lengthOfYear="+lengthOfYear);
    }
}
